var jiami = {};
	jiami.microdone3 = require("../utils/SM24.js");
	var aZ = false;
	function jU(dr) {
	  var aJ = dr.toString();
	  var str = "";
	  for (var i = 0; i < aJ.length; i += 2)
	    str += String.fromCharCode(parseInt(aJ.substr(i, 2), 16));
	  return str;
	}
	function lC(str) {
	  return str
	    .split("")
	    .map(function (c) {
	      return ("0" + c.charCodeAt(0).toString(16)).slice(-2);
	    })
	    .join("");
	}
	function vO(aA) {
	  return jU(pp(aA));
	}
	function sn(str) {
	  return nB(lC(str));
	}
	function pp(aA) {
	  for (var aJ = [], i = 0; i < aA.length; i++) {
	    aJ.push((aA[i] >>> 4).toString(16));
	    aJ.push((aA[i] & 0xf).toString(16));
	  }
	  return aJ.join("");
	}
	function nB(aJ) {
	  for (var aA = [], c = 0; c < aJ.length; c += 2)
	    aA.push(parseInt(aJ.substr(c, 2), 16));
	  return aA;
	}
	function messageguard(license) {
	  this.eW = {
	    eZ: function (aA, off) {
	      var wQ = aA[off] & 0xff;
	      var vA = aA[off + 1] & 0xff;
	      var vk = aA[off + 2] & 0xff;
	      var wO = aA[off + 3] & 0xff;
	      return (wO << 24) | (vk << 16) | (vA << 8) | wQ;
	    },
	    zG: function (aA, off) {
	      var ya = aA[off + 1];
	      var yS = aA[off];
	      return ((ya << 8) & 0xff00) | (yS & 0xff);
	    },
	    zl: function (aN) {
	      if (typeof aN === "string") {
	        return aN;
	      }
	      var str = "",
	        ip = aN;
	      for (var i = 0; i < ip.length; i++) {
	        var one = ip[i].toString(2),
	          v = one.match(/^1+?(?=0)/);
	        if (v && one.length == 8) {
	          var oI = v[0].length;
	          var qi = ip[i].toString(2).slice(7 - oI);
	          for (var nG = 1; nG < oI; nG++) {
	            qi += ip[nG + i].toString(2).slice(2);
	          }
	          str += String.fromCharCode(parseInt(qi, 2));
	          i += oI - 1;
	        } else {
	          str += String.fromCharCode(ip[i]);
	        }
	      }
	      return str;
	    },
	    yQ: function (i) {
	      var dY = [];
	      dY[0] = i & 0xff;
	      dY[1] = (i >> 8) & 0xff;
	      dY[2] = (i >> 16) & 0xff;
	      dY[3] = (i >> 24) & 0xff;
	      return dY;
	    },
	    zr: function (s) {
	      var dY = [];
	      dY[1] = (s >> 8) & 0xff;
	      dY[0] = s & 0xff;
	      return dY;
	    },
	    zL: function (str) {
	      var aA = new Array();
	      var ag, c;
	      ag = str.length;
	      for (var i = 0; i < ag; i++) {
	        c = str.charCodeAt(i);
	        if (c >= 0x010000 && c <= 0x10ffff) {
	          aA.push(((c >> 18) & 0x07) | 0xf0);
	          aA.push(((c >> 12) & 0x3f) | 0x80);
	          aA.push(((c >> 6) & 0x3f) | 0x80);
	          aA.push((c & 0x3f) | 0x80);
	        } else if (c >= 0x000800 && c <= 0x00ffff) {
	          aA.push(((c >> 12) & 0x0f) | 0xe0);
	          aA.push(((c >> 6) & 0x3f) | 0x80);
	          aA.push((c & 0x3f) | 0x80);
	        } else if (c >= 0x000080 && c <= 0x0007ff) {
	          aA.push(((c >> 6) & 0x1f) | 0xc0);
	          aA.push((c & 0x3f) | 0x80);
	        } else {
	          aA.push(c & 0xff);
	        }
	      }
	      return aA;
	    },
	    Bs: function (i) {
	      if (i >= 0) return i;
	      else 4294967296 + i;
	    },
	    AG: function (i) {
	      if (i <= 2147483647) return i;
	      else return i - 4294967296;
	    },
	    AE: function (i) {
	      if (i >= 0) return i;
	      else 65535 + i;
	    },
	    zP: function (i) {
	      if (i <= 32767) return i;
	      else return i - 65535;
	    },
	    AB: function (i) {
	      if (i >= 0) return i;
	      else 255 + i;
	    },
	    zB: function (i) {
	      if (i <= 127) return i;
	      else return i - 255;
	    },
	  };
	  var verifyflag = true;
	  var fs = true;
	  this.aW = {};
	  this.aW.reverse = function zx(b) {
	    for (var i = 0; i < b.length / 2; i++) {
	      var cF = b[i];
	      b[i] = b[b.length - 1 - i];
	      b[b.length - 1 - i] = cF;
	    }
	    return b;
	  };
	  this.aW.AM = function jU(dr) {
	    var aJ = dr.toString();
	    var str = "";
	    for (var i = 0; i < aJ.length; i += 2)
	      str += String.fromCharCode(parseInt(aJ.substr(i, 2), 16));
	    return str;
	  };
	  this.aW.sa = function lC(str) {
	    return str
	      .split("")
	      .map(function (c) {
	        return ("0" + c.charCodeAt(0).toString(16)).slice(-2);
	      })
	      .join("");
	  };
	  this.aW.uq = function vO(aA) {
	    return jU(pp(aA));
	  };
	  this.aW.qG = function sn(str) {
	    return nB(lC(str));
	  };
	  this.aW.fm = function pp(aA) {
	    for (var n = 0; n < aA.length; n++) {
	      aA[n] &= 0x000000ff;
	    }
	    for (var aJ = [], i = 0; i < aA.length; i++) {
	      aJ.push((aA[i] >>> 4).toString(16));
	      aJ.push((aA[i] & 0xf).toString(16));
	    }
	    return aJ.join("");
	  };
	  this.aW.aR = function nB(aJ) {
	    for (var aA = [], c = 0; c < aJ.length; c += 2)
	      aA.push(parseInt(aJ.substr(c, 2), 16));
	    return aA;
	  };
	  this.genRC = function bk() {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    if (this.kJ == 0) {
	      var ag = 64;
	      var ib = "ABCDEF1234567890";
	      var lJ = ib.length;
	      var pwd = "";
	      for (let i = 0; i < ag; i++) {
	        pwd += ib.charAt(Math.floor(Math.random() * lJ));
	      }
	      this.eY = pwd;
	      return this.eY;
	    }
	    return "";
	  };
	  this.genRL = function genrcrandomex() {
	    if (this.kJ == 0) {
	      var ag = 32;
	      var ib = "ABCDEFGHJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	      var lJ = ib.length;
	      var pwd = "";
	      for (var i = 0; i < ag; i++) {
	        pwd += ib.charAt(Math.floor(Math.random() * lJ));
	      }
	      var b = this.aW.qG(pwd);
	      pwd = this.aW.uq(b);
	      return this.aW.sa(pwd);
	    }
	    return "";
	  };
	  this.yk = function bC(l) {
	    var ag = l || 32;
	    var ib = "ABCDEF1234567890";
	    var lJ = ib.length;
	    var pwd = "";
	    for (var i = 0; i < ag; i++) {
	      pwd += ib.charAt(Math.floor(Math.random() * lJ));
	    }
	    return pwd;
	  };
	  this.init = function xg(ma) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    if (typeof ma != "undefine" && ma.length == 64) {
	      this.R = ma;
	      if (aZ) console.log("server R：" + this.R);
	    }
	  };
	  this.chagespec = function zC() {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var eG = this.nZ(this.oO(), this.R, this.eY);
	    var fi = this.aW.aR(this.eY);
	    var br = this.aW.aR(this.R);
	    var qu = [];
	    for (var i = 0; i < 32; i++) {
	      qu.push(fi[i] ^ br[i]);
	    }
	    var aH = jiami.microdone3.tW(qu);
	    var bo = jiami.microdone3.ea();
	    bo.init(this.aW.aR(eG));
	    var cD = bo.lW(this.aW.fm(aH), true);
	    eG = "";
	    var yW = this.aW.fm(cD);
	    this.kJ = 1;
	    return yW;
	  };
	  this.zz = function zD() {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var eG = this.nZ(this.oO(), this.R, this.eY);
	    var bo = jiami.microdone3.ea();
	    if (aZ) console.log("eG : ");
	    if (aZ) console.log(eG);
	    bo.init(this.aW.aR(eG));
	    var cD = bo.lW(
	      "52204091D6714B220A7BA049A96A300F043BB9A0BD238408FFDD330AA0D2FCC5041093A047C5CBF48283EC7A210703F3FF9EA4448DC15D56B4CD82FCB27DAD2D45F2BB0BF953BCEBB635D9D34E473ECEFC9F25880EB1669F94DE050A29AC86F308",
	      true
	    );
	    if (aZ) console.log("cF  : ");
	    if (aZ) console.log(this.aW.fm(cD));
	    return this.aW.fm(cD);
	  };
	  this.oH = function yx(A) {
	    var eG = this.nZ(this.oO(), this.R, this.eY);
	    if (aZ) console.log("A : ");
	    if (aZ) console.log(A);
	    var bo = jiami.microdone3.ea();
	    bo.init(this.aW.aR(eG));
	    var mz = bo.qK(this.aW.aR(A));
	    if (aZ) console.log("ok A:");
	    if (aZ) console.log(mz);
	    var an = {};
	    an.lx = mz.slice(0, 64);
	    an.eL = mz.slice(64);
	    if (aZ) console.log("eL : " + an.eL);
	    if (aZ) console.log("lx : " + an.lx);
	    return an;
	  };
	  this.finish = function AN(A) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    this.A = A;
	    this.kJ = 2;
	    return true;
	  };
	  this.foldenvelop = function gh(tU) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var jD = this.oH(this.A);
	    var cp = jD.eL;
	    var fU = jD.lx;
	    if (aZ) console.log(fU);
	    if (aZ) console.log(cp);
	    var ae = "sm2";
	    var kX = "SM3withSM2";
	    var qg = tU;
	    var aG = new jiami.microdone3.aa.crypto.ga({
	      ad: kX,
	      bM: "cryptojs/jsrsa",
	    });
	    aG.qH({ dA: fU, dv: ae, dk: 0 });
	    aG.dq(qg);
	    var jJ = aG.eP();
	    var lf = this.aW.aR(jJ);
	    if (aZ) console.log("eP ag : " + lf.length);
	    if (aZ) console.log("eP : " + lf);
	    var ni = this.yk(32);
	    if (aZ) console.log("session key : " + ni);
	    var uO = jiami.microdone3.aQ(ni, cp, "1", true);
	    var lY = this.aW.aR(uO);
	    if (aZ) console.log("sm2 gh data ag : " + lY.length);
	    if (aZ) console.log("sm2 gh data : " + lY);
	    var oE = this.aW.aR(ni);
	    var nY = this.aW.aR(this.R);
	    var im = [];
	    for (var i = 0; i < 16; ++i) {
	      im[i] = oE[i] ^ nY[i];
	    }
	    var bo = jiami.microdone3.ea();
	    bo.init(im);
	    var cD = bo.lW(qg);
	    if (aZ) console.log("ea gh data ag : " + cD.length);
	    if (aZ) console.log("ea gh data : " + cD);
	    this.uK();
	    if (aZ) console.log("gi : " + this.gi);
	    var n = this.eW.yQ(this.gi);
	    var m = this.hh;
	    if (aZ) console.log("n : " + n);
	    if (aZ) console.log("m : " + m);
	    var lF = n.concat(m, lf, lY, cD);
	    if (aZ) console.log("lF :" + lF);
	    var aT = bo.vJ(lF);
	    return aT;
	  };
	  this.unfoldenvelop = function ok(tq) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var jD = this.oH(this.A);
	    var cp = jD.eL;
	    var fU = jD.lx;
	    var bo = jiami.microdone3.ea();
	    var gS = bo.mq(tq);
	    if (aZ) console.log("gS : " + gS);
	    var nq = gS;
	    var a = nq.slice(0, 64);
	    var b = nq.slice(64, 193);
	    var c = nq.slice(193);
	    if (aZ) console.log("a:" + a.length + " b:" + b.length + " c:" + c.length);
	    if (aZ) console.log(fU);
	    if (aZ) console.log(cp);
	    var vT = this.aW.fm(b);
	    var oS = jiami.microdone3.aF(vT, fU, "1", true);
	    if (aZ) console.log("oS : " + oS);
	    var im = [];
	    var oE = this.aW.aR(oS);
	    var nY = this.aW.aR(this.R);
	    for (let i = 0; i < 16; ++i) {
	      im.push(oE[i] ^ nY[i]);
	    }
	    bo.init(im);
	    var cD = bo.qK(c);
	    if (aZ) console.log("ea ok data ag : " + cD.length);
	    if (aZ) console.log("ea ok data : " + cD);
	    if (aZ) console.log("gS " + this.aW.qG(cD));
	    var ae = "sm2";
	    var kX = "SM3withSM2";
	    var kN = new jiami.microdone3.aa.crypto.ga({
	      ad: kX,
	      bM: "cryptojs/jsrsa",
	    });
	    kN.lO({ ca: cp, dv: ae, dk: 0 });
	    kN.dq(cD);
	    var jJ = this.aW.fm(a);
	    var result = kN.verify(jJ);
	    if (aZ) console.log("verify result : " + result);
	    if (result) {
	      if (aZ) console.log("valid signature");
	      return cD;
	    } else {
	      if (aZ) console.log("invalid signature");
	      return { code: -102, pI: "invalid signature" };
	    }
	    return "";
	  };
	  this.foldenveloplite = function encryptlite(tq) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var result = "";
	    var cr = this.genRL();
	    var keys = this.kdflite(this.makeylite(cr), cr);
	    var im = keys[0];
	    var sm3key = keys[1];
	    var bo = jiami.microdone3.ea();
	    bo.init(this.aW.aR(im));
	    var cD = bo.lW(tq);
	    var randp = cr + tq;
	    var fq = new jiami.microdone3.lh();
	    var gm = fq.bA(this.aW.aR(sm3key), sn(randp));
	    result = bo.vJ(sn(cr).concat(gm, cD));
	    return result;
	  };
	  this.changearr = function (aN) {
	    for (var n = 0; n < aN.length; n++) {
	      aN[n] &= 0x000000ff;
	    }
	    return aN;
	  };
	  this.unfoldenveloplite = function decryptlite(cii) {
	    if (!verifyflag) {
	      console.log("license verify error!");
	      return;
	    }
	    var retjson = {};
	    var bo = jiami.microdone3.ea();
	    var tq = bo.mq(cii);
	    var result = "";
	    var r = vO(tq.slice(0, 64));
	    var h = tq.slice(64, 96);
	    var d = tq.slice(96);
	    var keys = this.kdflite(this.makeylite(r), r);
	    var im = keys[0];
	    var sm3key = keys[1];
	    bo.init(this.aW.aR(im));
	    var mz = bo.qK(d);
	    var randp = r + mz;
	    var fq = new jiami.microdone3.lh();
	    var gm = fq.bA(this.aW.aR(sm3key), sn(randp));
	    gm = this.changearr(gm);
	    var yW = this.aW.fm(gm);
	    if (yW == this.aW.fm(h)) {
	      retjson.message = "verify successed";
	      retjson.code = "0";
	      retjson.str = mz;
	    } else {
	      retjson.message = "invalid signature";
	      retjson.code = "-102";
	    }
	    return retjson;
	  };
	  this.cDecryptByECBAnCheckHmac = function (estr) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    try {
	      var dstr = estr.substring(0, estr.length - 80);
	      var hashstr = estr.substring(estr.length - 80);
	    } catch (e) {
	      return { code: "-21", message: e.message };
	    }
	    try {
	      var result = "";
	      var cr = this.sN;
	      var keys = this.kdflite(this.makeylite(cr), cr);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-22", message: e.message };
	    }
	    try {
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      var tempch = dstr.substring(dstr.length - 16);
	      if (hexen.toUpperCase() != tempch.toUpperCase()) {
	        return { code: "-31", message: "zek checkval compare fail!" };
	      }
	      dstr = dstr.substring(0, dstr.length - 16);
	      var bo = jiami.microdone3.ea();
	      bo.init(this.aW.aR(this.zekstr));
	      var strby = bo.qK(this.aW.aR(dstr), false);
	      var str = this.aW.fm(strby);
	      strby = this.aW.aR(str);
	      var sstr = this.aW.uq(strby);
	      sstr = decodeURIComponent(sstr);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      var tempch = hashstr.substring(hashstr.length - 16);
	      if (tempch.toUpperCase() != hexenmac.toUpperCase()) {
	        return { code: "-32", message: "zak checkval compare fail!" };
	      }
	      hashstr = hashstr.substring(0, hashstr.length - 16);
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), strby);
	      var yW = this.aW.fm(gm).toUpperCase();
	      if (yW.toUpperCase() == hashstr.toUpperCase()) {
	        return { code: "0", message: sstr };
	      } else {
	        return { code: "-1", message: "compare fail!" };
	      }
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	  };
	  this.cDecryptByCBCAnCheckHmac = function (estr) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    try {
	      var dstr = estr.substring(0, estr.length - 80);
	      var hashstr = estr.substring(estr.length - 80);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var result = "";
	      var cr = this.sN;
	      var keys = this.kdflite(this.makeylite(cr), cr);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      var tempch = dstr.substring(dstr.length - 16);
	      if (hexen.toUpperCase() != tempch.toUpperCase()) {
	        return { code: "-31", message: "zek checkval compare fail!" };
	      }
	      dstr = dstr.substring(0, dstr.length - 16);
	      var smu = new jiami.microdone3.zi();
	      var str = smu.CA(
	        dstr,
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      var strby = this.aW.aR(str);
	      var sstr = this.aW.uq(strby);
	      sstr = decodeURIComponent(sstr);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      var tempch = hashstr.substring(hashstr.length - 16);
	      if (tempch.toUpperCase() != hexenmac.toUpperCase()) {
	        return { code: "-32", message: "zak checkval compare fail!" };
	      }
	      hashstr = hashstr.substring(0, hashstr.length - 16);
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), strby);
	      var yW = this.aW.fm(gm).toUpperCase();
	      if (yW.toUpperCase() == hashstr.toUpperCase()) {
	        return { code: "0", message: sstr };
	      } else {
	        return { code: "-1", message: "compare fail!" };
	      }
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	  };
	  this.cEncryptByECBAndHmacInit = function (tq, pubid) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    try {
	      var sN = this.genRC();
	      this.sN = sN;
	      var x =
	        "3D0CA711072E9286D06441BE87C858029D2F352BF36CBCFC256F19CE8541436C";
	      var y =
	        "2E290A42EA6AF9405A6DF139BA8ED324CD43A9FC01F3AC767E87AC4720650B9F";
	      var x1 =
	        "CB5E1829A91872FFDEC0563BC870DDE9E89EF210B3C8AD06D63A3A103D060059";
	      var y1 =
	        "E37055A582ACC9E8440734D5322E84B649E85429B5EEE6C7820DCBAE95351F1D";
	      if (pubid == 1) {
	        var rnpie = jiami.microdone3
	          .aQ(sN, x + y, "1", true, false)
	          .toUpperCase();
	      } else {
	        var rnpie = jiami.microdone3
	          .aQ(sN, x1 + y1, "1", true, false)
	          .toUpperCase();
	      }
	    } catch (e) {
	      return { code: "-21", message: e.message };
	    }
	    try {
	      var result = "";
	      var keys = this.kdflite(this.makeylite(sN), sN);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-22", message: e.message };
	    }
	    try {
	      var tempstr = encodeURIComponent(tq);
	      var estr = this.aW.qG(tempstr);
	    } catch (e) {
	      return { code: "-23", message: e.message };
	    }
	    try {
	      var temparr = [];
	      Array.Copy(estr, 0, temparr, 0, estr.length);
	      var bo = jiami.microdone3.ea();
	      bo.init(this.aW.aR(this.zekstr));
	      var cD = bo.gh(temparr);
	      var enchex = this.aW.fm(cD);
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      enchex = enchex + hexen;
	    } catch (e) {
	      return { code: "-24", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      yW = yW + hexenmac;
	    } catch (e) {
	      return { code: "-25", message: e.message };
	    }
	    return { code: "0", message: rnpie + (enchex + yW).toUpperCase() };
	  };
	  this.cEncryptByCBCAndHmacInit = function (tq, pubid) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    try {
	      var sN = this.genRC();
	      this.sN = sN;
	      var x =
	        "3D0CA711072E9286D06441BE87C858029D2F352BF36CBCFC256F19CE8541436C";
	      var y =
	        "2E290A42EA6AF9405A6DF139BA8ED324CD43A9FC01F3AC767E87AC4720650B9F";
	      var x1 =
	        "CB5E1829A91872FFDEC0563BC870DDE9E89EF210B3C8AD06D63A3A103D060059";
	      var y1 =
	        "E37055A582ACC9E8440734D5322E84B649E85429B5EEE6C7820DCBAE95351F1D";
	      if (pubid == 1) {
	        var rnpie = jiami.microdone3
	          .aQ(sN, x + y, "1", true, false)
	          .toUpperCase();
	      } else {
	        var rnpie = jiami.microdone3
	          .aQ(sN, x1 + y1, "1", true, false)
	          .toUpperCase();
	      }
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var result = "";
	      var keys = this.kdflite(this.makeylite(sN), sN);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var tempstr = encodeURIComponent(tq);
	      var estr = this.aW.qG(tempstr);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var temparr = [];
	      Array.Copy(estr, 0, temparr, 0, estr.length);
	      var bo = new jiami.microdone3.zi();
	      var enchex = bo.ll(
	        this.aW.fm(temparr),
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      enchex = enchex + hexen;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      yW = yW + hexenmac;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    return { code: "0", message: rnpie + (enchex + yW).toUpperCase() };
	  };
	  this.cEncryptByECBAndHmac = function (tq) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    var sN = this.sN;
	    try {
	      var result = "";
	      var keys = this.kdflite(this.makeylite(sN), sN);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var tempstr = encodeURIComponent(tq);
	      var estr = this.aW.qG(tempstr);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var temparr = [];
	      Array.Copy(estr, 0, temparr, 0, estr.length);
	      var bo = jiami.microdone3.ea();
	      bo.init(this.aW.aR(this.zekstr));
	      var cD = bo.gh(temparr);
	      var enchex = this.aW.fm(cD);
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      enchex = enchex + hexen;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      yW = yW + hexenmac;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    return { code: "0", message: (enchex + yW).toUpperCase() };
	  };
	  this.cEncryptByCBCAndHmac = function (tq) {
	    if (!fs) {
	      console.log("license verify error!");
	      return false;
	    }
	    var sN = this.sN;
	    try {
	      var result = "";
	      var keys = this.kdflite(this.makeylite(sN), sN);
	      var im = keys[0];
	      var sm3key = keys[1].substring(0, 32);
	      this.zekstr = im;
	      this.zakstr = sm3key;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var tempstr = encodeURIComponent(tq);
	      var estr = this.aW.qG(tempstr);
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var temparr = [];
	      Array.Copy(estr, 0, temparr, 0, estr.length);
	      var bo = new jiami.microdone3.zi();
	      var enchex = bo.ll(
	        this.aW.fm(temparr),
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      var smu = new jiami.microdone3.zi();
	      var hexen = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zekstr.toUpperCase()
	      );
	      hexen = hexen.substring(0, hexen.length - 32);
	      hexen = hexen.substring(0, 16);
	      enchex = enchex + hexen;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    try {
	      var fq = new jiami.microdone3.lh();
	      var gm = fq.bA(this.aW.aR(this.zakstr), estr);
	      var yW = this.aW.fm(gm).toUpperCase();
	      var hexenmac = smu.ll(
	        "00000000000000000000000000000000",
	        "00000000000000000000000000000000",
	        this.zakstr.toUpperCase()
	      );
	      hexenmac = hexenmac.substring(0, hexenmac.length - 32);
	      hexenmac = hexenmac.substring(0, 16);
	      yW = yW + hexenmac;
	    } catch (e) {
	      return { code: "-2", message: e.message };
	    }
	    return { code: "0", message: (enchex + yW).toUpperCase() };
	  };
	  this.reset = function Reset() {
	    this.kJ = 0;
	    this.gi = 0;
	    this.hh = [];
	    this.eY = "";
	    this.R = "";
	    this.A = "";
	  };
	  this.uK = function AK() {
	    var hx = this.aW.aR(this.Y);
	    var br = this.aW.aR(this.R);
	    this.aW.reverse(hx);
	    this.aW.reverse(br);
	    var fq = new jiami.microdone3.lh();
	    var gm = fq.bA(br, hx);
	    var yJ = fq.bA(gm, hx);
	    this.hh = br;
	    var gm = fq.bA(yJ, this.hh);
	    this.hh = gm;
	    this.gi++;
	  };
	  this.eY = "";
	  this.Y = "F5B02FD742D8405F90368E49D258FB03A7C5DB2EFD684802B474E25DEF105FF2";
	  this.R = "";
	  this.A = "";
	  this.kJ = 0;
	  this.gi = 0;
	  this.hh = [];
	  this.pB = "3c7b94833656492c87dd3a58f87487c83bcffe312b444bb8afbc508baf4f6b46";
	  this.qo = "c4cacee5ec46477dad3cfdea9e94a7468813a0b1e5a74c1f9d175fea136d13b6";
	  this.pL = "d1dd43c53492499cb6224f67565d43810432de0d10a04f0ea95a98424df1a8fd";
	  this.jk = 0x05;
	}
	messageguard.prototype.oO = function AU() {
	  var yB = this.aW.aR(this.pB.slice(0, 32));
	  var yd = this.aW.aR(this.pB.slice(32));
	  var yF = this.aW.aR(this.qo.slice(0, 32));
	  var yf = this.aW.aR(this.qo.slice(32));
	  var yG = this.aW.aR(this.pL.slice(0, 32));
	  var uV = this.aW.aR(this.pL.slice(32));
	  var hy = yd.concat(yB);
	  var gv = yf.concat(yF);
	  var hC = uV.concat(yG);
	  var br = this.aW.aR(this.R);
	  var xI = this.eW.eZ(br, 0);
	  var xY = this.eW.eZ(br, 4);
	  var qv = this.eW.eZ(br, 8);
	  var xN = this.eW.eZ(br, 12);
	  var yu = this.eW.eZ(br, 16);
	  var xL = this.eW.eZ(br, 20);
	  var yH = this.eW.eZ(br, 24);
	  var zc = this.eW.eZ(br, 28);
	  var yb = xI ^ xY ^ qv ^ xN ^ yu ^ xL ^ yH ^ qv;
	  var jz = yb % 6;
	  var fi = this.aW.aR(this.eY);
	  var hD = [];
	  if (jz == 0) {
	    hD = hy.concat(gv, hC);
	  } else if (jz == 1) {
	    hD = hy.concat(hC, gv);
	  } else if (jz == 2) {
	    hD = gv.concat(hy, hC);
	  } else if (jz == 3) {
	    hD = gv.concat(hC, hy);
	  } else if (jz == 4) {
	    hD = hC.concat(gv, hy);
	  } else {
	    hD = hC.concat(hy, gv);
	  }
	  var fq = new jiami.microdone3.lh();
	  var gm = fq.bA(br, fi);
	  var sv = fq.bA(fi, hD);
	  var sG = fq.bA(br, sv);
	  var sV = this.aW.reverse(sG);
	  var xp = this.aW.fm(sV);
	  return xp;
	};
	messageguard.prototype.nZ = function Cx(y, r, sN) {
	  var hx = this.aW.aR(y);
	  var br = this.aW.aR(r);
	  var fi = this.aW.aR(sN);
	  var fq = new jiami.microdone3.lh();
	  var gm = fq.bA(br, fi);
	  var v = fq.bA(gm, hx);
	  var lZ = fi.slice(0, 16);
	  var nn = fi.slice(16);
	  var qp = [];
	  for (var i = 0; i < 32; i++) {
	    qp.push(lZ[i] ^ nn[i]);
	  }
	  var bo = jiami.microdone3.ea();
	  bo.init(qp);
	  var cD = bo.fc(v, false, true);
	  var nQ = this.aW.reverse(cD);
	  lZ = nQ.slice(0, 16);
	  nn = nQ.slice(16);
	  var ri = [];
	  for (var i = 0; i < 16; i++) {
	    ri.push(lZ[i] ^ nn[i]);
	  }
	  var xQ = this.aW.fm(ri);
	  return xQ;
	};
	messageguard.prototype.makeylite = function AU(r) {
	  var yB = this.aW.aR(this.pB.slice(0, 32));
	  var yd = this.aW.aR(this.pB.slice(32));
	  var yF = this.aW.aR(this.qo.slice(0, 32));
	  var yf = this.aW.aR(this.qo.slice(32));
	  var yG = this.aW.aR(this.pL.slice(0, 32));
	  var uV = this.aW.aR(this.pL.slice(32));
	  var hy = yd.concat(yB);
	  var gv = yf.concat(yF);
	  var hC = uV.concat(yG);
	  var br = this.aW.aR(r);
	  var xI = this.eW.eZ(br, 0);
	  var xY = this.eW.eZ(br, 4);
	  var qv = this.eW.eZ(br, 8);
	  var xN = this.eW.eZ(br, 12);
	  var yu = this.eW.eZ(br, 16);
	  var xL = this.eW.eZ(br, 20);
	  var yH = this.eW.eZ(br, 24);
	  var zc = this.eW.eZ(br, 28);
	  var yb = xI ^ xY ^ qv ^ xN ^ yu ^ xL ^ yH ^ qv;
	  var jz = yb % 6;
	  var fi = this.aW.aR(r);
	  var hD = [];
	  if (jz == 0) {
	    hD = hy.concat(gv, hC);
	  } else if (jz == 1) {
	    hD = hy.concat(hC, gv);
	  } else if (jz == 2) {
	    hD = gv.concat(hy, hC);
	  } else if (jz == 3) {
	    hD = gv.concat(hC, hy);
	  } else if (jz == 4) {
	    hD = hC.concat(gv, hy);
	  } else {
	    hD = hC.concat(hy, gv);
	  }
	  var fq = new jiami.microdone3.lh();
	  var gm = fq.bA(br, fi);
	  var sv = fq.bA(fi, hD);
	  var sG = fq.bA(br, sv);
	  var sV = this.aW.reverse(sG);
	  var xp = this.aW.fm(sV);
	  return xp;
	};
	messageguard.prototype.kdflite = function KDFLITE(y, r) {
	  var hx = this.aW.aR(y);
	  var br = this.aW.aR(r);
	  var fq = new jiami.microdone3.lh();
	  var v = fq.bA(br, hx);
	  var lZ = br.slice(0, 16);
	  var nn = br.slice(16);
	  var qp = [];
	  for (var i = 0; i < 32; i++) {
	    qp.push(lZ[i] ^ nn[i]);
	  }
	  var bo = jiami.microdone3.ea();
	  bo.init(qp);
	  var cD = bo.fc(v, false, true);
	  var nQ = this.aW.reverse(cD);
	  lZ = nQ.slice(0, 16);
	  nn = nQ.slice(16);
	  var ri = [];
	  for (var i = 0; i < 16; i++) {
	    ri.push(lZ[i] ^ nn[i]);
	  }
	  var xQ = this.aW.fm(ri);
	  var sm3key = this.aW.fm(nQ);
	  return new Array(xQ, sm3key);
	};
     
      const uiUtils = {
        getbwjm: function   () {
            return messageguard
          }
      }
      export default uiUtils